#ifndef _CSTATUSBAR_H_
#define _CSTATUSBAR_H_

#include <buola/gui/cwindow.h>
#include <buola/gui/cicon.h>
#include <buola/widgets/csblist.h>

namespace buola { namespace gui {

class CStatusBar : public CWindow,public CSBList
{
public:
    CStatusBar();
    ~CStatusBar();

protected:
    void ShapeAll();
    void PosAll();

    void DrawItem(img::CGC*,CSBItem*);
    void UndrawItem(img::CGC*,CSBItem*);

public:
////////////// Event handling //////////////
    virtual void OnSize(const CGeometryEvent &pE);
    virtual void OnExpose(const CExposeEvent &pE);
    virtual void OnButtonDown(const CMouseEvent &pE);
    virtual void OnButtonUp(const CMouseEvent &pE);
    virtual void OnMouseMove(const CMouseEvent &pE);
    virtual void OnMouseOut(const CMouseEvent &pE);

    virtual void OnItemAdded(CSBItem*);
    virtual void OnItemChanged(CSBItem*);

protected:
    int mType;

    int mTextX;

    bool mPressed;

    img::PFont mFont;

////////////////// static data //////////////////
};

/*namespace gui*/ } /*namespace buola*/ }

#endif
